Optimal. Leaf size=149 \[ -\frac {b (e f-d g)^3 n x}{4 e^3}-\frac {b (e f-d g)^2 n (f+g x)^2}{8 e^2 g}-\frac {b (e f-d g) n (f+g x)^3}{12 e g}-\frac {b n (f+g x)^4}{16 g}-\frac {b (e f-d g)^4 n \log (d+e x)}{4 e^4 g}+\frac {(f+g x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 g} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2442, 45}
\begin {gather*} \frac {(f+g x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 g}-\frac {b n (e f-d g)^4 \log (d+e x)}{4 e^4 g}-\frac {b n x (e f-d g)^3}{4 e^3}-\frac {b n (f+g x)^2 (e f-d g)^2}{8 e^2 g}-\frac {b n (f+g x)^3 (e f-d g)}{12 e g}-\frac {b n (f+g x)^4}{16 g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2442
Rubi steps
\begin {align*} \int (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx &=\frac {(f+g x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 g}-\frac {(b e n) \int \frac {(f+g x)^4}{d+e x} \, dx}{4 g}\\ &=\frac {(f+g x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 g}-\frac {(b e n) \int \left (\frac {g (e f-d g)^3}{e^4}+\frac {(e f-d g)^4}{e^4 (d+e x)}+\frac {g (e f-d g)^2 (f+g x)}{e^3}+\frac {g (e f-d g) (f+g x)^2}{e^2}+\frac {g (f+g x)^3}{e}\right ) \, dx}{4 g}\\ &=-\frac {b (e f-d g)^3 n x}{4 e^3}-\frac {b (e f-d g)^2 n (f+g x)^2}{8 e^2 g}-\frac {b (e f-d g) n (f+g x)^3}{12 e g}-\frac {b n (f+g x)^4}{16 g}-\frac {b (e f-d g)^4 n \log (d+e x)}{4 e^4 g}+\frac {(f+g x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 g}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.16, size = 226, normalized size = 1.52 \begin {gather*} \frac {e x \left (12 a e^3 \left (4 f^3+6 f^2 g x+4 f g^2 x^2+g^3 x^3\right )-b n \left (-12 d^3 g^3+6 d^2 e g^2 (8 f+g x)-4 d e^2 g \left (18 f^2+6 f g x+g^2 x^2\right )+e^3 \left (48 f^3+36 f^2 g x+16 f g^2 x^2+3 g^3 x^3\right )\right )\right )-12 b d^2 g \left (6 e^2 f^2-4 d e f g+d^2 g^2\right ) n \log (d+e x)+12 b e^3 \left (4 d f^3+e x \left (4 f^3+6 f^2 g x+4 f g^2 x^2+g^3 x^3\right )\right ) \log \left (c (d+e x)^n\right )}{48 e^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.38, size = 836, normalized size = 5.61
method | result | size |
risch | \(\frac {b \,f^{3} n d \ln \left (e x +d \right )}{e}-\frac {i \pi b \,f^{3} x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )}{2}+\frac {i g^{2} \pi b f \,x^{3} \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2}+\frac {3 i g \pi b \,f^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{4}+\frac {3 i g \pi b \,f^{2} x^{2} \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{4}+\frac {a \,g^{3} x^{4}}{4}+x a \,f^{3}-b \,f^{3} n x +\frac {\left (g x +f \right )^{4} b \ln \left (\left (e x +d \right )^{n}\right )}{4 g}+\frac {i g^{2} \pi b f \,x^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2}-\frac {i g^{3} \pi b \,x^{4} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )}{8}+\frac {3 g \ln \left (c \right ) b \,f^{2} x^{2}}{2}+\ln \left (c \right ) b \,f^{3} x +\frac {g^{3} \ln \left (c \right ) b \,x^{4}}{4}-\frac {i \pi b \,f^{3} x \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}}{2}-\frac {i g^{3} \pi b \,x^{4} \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}}{8}-\frac {3 i g \pi b \,f^{2} x^{2} \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}}{4}+\frac {i g^{3} \pi b \,x^{4} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{8}+\frac {i \pi b \,f^{3} x \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2}+\frac {i \pi b \,f^{3} x \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2}+\frac {i g^{3} \pi b \,x^{4} \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{8}-\frac {i g^{2} \pi b f \,x^{3} \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}}{2}+\frac {g^{2} b d f n \,x^{2}}{2 e}-\frac {g^{2} b \,d^{2} f n x}{e^{2}}+\frac {3 g b d \,f^{2} n x}{2 e}+\frac {g^{2} \ln \left (e x +d \right ) b \,d^{3} f n}{e^{3}}-\frac {3 g \ln \left (e x +d \right ) b \,d^{2} f^{2} n}{2 e^{2}}-\frac {3 i g \pi b \,f^{2} x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )}{4}-\frac {i g^{2} \pi b f \,x^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )}{2}-\frac {3 g b \,f^{2} n \,x^{2}}{4}+\frac {g^{3} b \,d^{3} n x}{4 e^{3}}-\frac {g^{2} b f n \,x^{3}}{3}-\frac {g^{3} b \,d^{2} n \,x^{2}}{8 e^{2}}-\frac {g^{3} b n \,x^{4}}{16}+g^{2} a f \,x^{3}+\frac {3 g a \,f^{2} x^{2}}{2}-\frac {\ln \left (e x +d \right ) b \,f^{4} n}{4 g}+g^{2} \ln \left (c \right ) b f \,x^{3}+\frac {g^{3} b d n \,x^{3}}{12 e}-\frac {g^{3} \ln \left (e x +d \right ) b \,d^{4} n}{4 e^{4}}\) | \(836\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 287 vs.
\(2 (139) = 278\).
time = 0.28, size = 287, normalized size = 1.93 \begin {gather*} \frac {1}{4} \, b g^{3} x^{4} \log \left ({\left (x e + d\right )}^{n} c\right ) + \frac {1}{4} \, a g^{3} x^{4} + b f g^{2} x^{3} \log \left ({\left (x e + d\right )}^{n} c\right ) + a f g^{2} x^{3} + {\left (d e^{\left (-2\right )} \log \left (x e + d\right ) - x e^{\left (-1\right )}\right )} b f^{3} n e - \frac {3}{4} \, {\left (2 \, d^{2} e^{\left (-3\right )} \log \left (x e + d\right ) + {\left (x^{2} e - 2 \, d x\right )} e^{\left (-2\right )}\right )} b f^{2} g n e + \frac {1}{6} \, {\left (6 \, d^{3} e^{\left (-4\right )} \log \left (x e + d\right ) - {\left (2 \, x^{3} e^{2} - 3 \, d x^{2} e + 6 \, d^{2} x\right )} e^{\left (-3\right )}\right )} b f g^{2} n e - \frac {1}{48} \, {\left (12 \, d^{4} e^{\left (-5\right )} \log \left (x e + d\right ) + {\left (3 \, x^{4} e^{3} - 4 \, d x^{3} e^{2} + 6 \, d^{2} x^{2} e - 12 \, d^{3} x\right )} e^{\left (-4\right )}\right )} b g^{3} n e + \frac {3}{2} \, b f^{2} g x^{2} \log \left ({\left (x e + d\right )}^{n} c\right ) + \frac {3}{2} \, a f^{2} g x^{2} + b f^{3} x \log \left ({\left (x e + d\right )}^{n} c\right ) + a f^{3} x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 304 vs.
\(2 (139) = 278\).
time = 0.40, size = 304, normalized size = 2.04 \begin {gather*} \frac {1}{48} \, {\left (12 \, b d^{3} g^{3} n x e + 12 \, {\left (b g^{3} x^{4} + 4 \, b f g^{2} x^{3} + 6 \, b f^{2} g x^{2} + 4 \, b f^{3} x\right )} e^{4} \log \left (c\right ) - {\left (3 \, {\left (b g^{3} n - 4 \, a g^{3}\right )} x^{4} + 16 \, {\left (b f g^{2} n - 3 \, a f g^{2}\right )} x^{3} + 36 \, {\left (b f^{2} g n - 2 \, a f^{2} g\right )} x^{2} + 48 \, {\left (b f^{3} n - a f^{3}\right )} x\right )} e^{4} + 4 \, {\left (b d g^{3} n x^{3} + 6 \, b d f g^{2} n x^{2} + 18 \, b d f^{2} g n x\right )} e^{3} - 6 \, {\left (b d^{2} g^{3} n x^{2} + 8 \, b d^{2} f g^{2} n x\right )} e^{2} - 12 \, {\left (b d^{4} g^{3} n - 4 \, b d^{3} f g^{2} n e + 6 \, b d^{2} f^{2} g n e^{2} - 4 \, b d f^{3} n e^{3} - {\left (b g^{3} n x^{4} + 4 \, b f g^{2} n x^{3} + 6 \, b f^{2} g n x^{2} + 4 \, b f^{3} n x\right )} e^{4}\right )} \log \left (x e + d\right )\right )} e^{\left (-4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 410 vs.
\(2 (128) = 256\).
time = 1.28, size = 410, normalized size = 2.75 \begin {gather*} \begin {cases} a f^{3} x + \frac {3 a f^{2} g x^{2}}{2} + a f g^{2} x^{3} + \frac {a g^{3} x^{4}}{4} - \frac {b d^{4} g^{3} \log {\left (c \left (d + e x\right )^{n} \right )}}{4 e^{4}} + \frac {b d^{3} f g^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{e^{3}} + \frac {b d^{3} g^{3} n x}{4 e^{3}} - \frac {3 b d^{2} f^{2} g \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} - \frac {b d^{2} f g^{2} n x}{e^{2}} - \frac {b d^{2} g^{3} n x^{2}}{8 e^{2}} + \frac {b d f^{3} \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + \frac {3 b d f^{2} g n x}{2 e} + \frac {b d f g^{2} n x^{2}}{2 e} + \frac {b d g^{3} n x^{3}}{12 e} - b f^{3} n x + b f^{3} x \log {\left (c \left (d + e x\right )^{n} \right )} - \frac {3 b f^{2} g n x^{2}}{4} + \frac {3 b f^{2} g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} - \frac {b f g^{2} n x^{3}}{3} + b f g^{2} x^{3} \log {\left (c \left (d + e x\right )^{n} \right )} - \frac {b g^{3} n x^{4}}{16} + \frac {b g^{3} x^{4} \log {\left (c \left (d + e x\right )^{n} \right )}}{4} & \text {for}\: e \neq 0 \\\left (a + b \log {\left (c d^{n} \right )}\right ) \left (f^{3} x + \frac {3 f^{2} g x^{2}}{2} + f g^{2} x^{3} + \frac {g^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 780 vs.
\(2 (139) = 278\).
time = 4.25, size = 780, normalized size = 5.23 \begin {gather*} \frac {1}{4} \, {\left (x e + d\right )}^{4} b g^{3} n e^{\left (-4\right )} \log \left (x e + d\right ) - {\left (x e + d\right )}^{3} b d g^{3} n e^{\left (-4\right )} \log \left (x e + d\right ) + \frac {3}{2} \, {\left (x e + d\right )}^{2} b d^{2} g^{3} n e^{\left (-4\right )} \log \left (x e + d\right ) - {\left (x e + d\right )} b d^{3} g^{3} n e^{\left (-4\right )} \log \left (x e + d\right ) - \frac {1}{16} \, {\left (x e + d\right )}^{4} b g^{3} n e^{\left (-4\right )} + \frac {1}{3} \, {\left (x e + d\right )}^{3} b d g^{3} n e^{\left (-4\right )} - \frac {3}{4} \, {\left (x e + d\right )}^{2} b d^{2} g^{3} n e^{\left (-4\right )} + {\left (x e + d\right )} b d^{3} g^{3} n e^{\left (-4\right )} + {\left (x e + d\right )}^{3} b f g^{2} n e^{\left (-3\right )} \log \left (x e + d\right ) - 3 \, {\left (x e + d\right )}^{2} b d f g^{2} n e^{\left (-3\right )} \log \left (x e + d\right ) + 3 \, {\left (x e + d\right )} b d^{2} f g^{2} n e^{\left (-3\right )} \log \left (x e + d\right ) + \frac {1}{4} \, {\left (x e + d\right )}^{4} b g^{3} e^{\left (-4\right )} \log \left (c\right ) - {\left (x e + d\right )}^{3} b d g^{3} e^{\left (-4\right )} \log \left (c\right ) + \frac {3}{2} \, {\left (x e + d\right )}^{2} b d^{2} g^{3} e^{\left (-4\right )} \log \left (c\right ) - {\left (x e + d\right )} b d^{3} g^{3} e^{\left (-4\right )} \log \left (c\right ) - \frac {1}{3} \, {\left (x e + d\right )}^{3} b f g^{2} n e^{\left (-3\right )} + \frac {3}{2} \, {\left (x e + d\right )}^{2} b d f g^{2} n e^{\left (-3\right )} - 3 \, {\left (x e + d\right )} b d^{2} f g^{2} n e^{\left (-3\right )} + \frac {1}{4} \, {\left (x e + d\right )}^{4} a g^{3} e^{\left (-4\right )} - {\left (x e + d\right )}^{3} a d g^{3} e^{\left (-4\right )} + \frac {3}{2} \, {\left (x e + d\right )}^{2} a d^{2} g^{3} e^{\left (-4\right )} - {\left (x e + d\right )} a d^{3} g^{3} e^{\left (-4\right )} + \frac {3}{2} \, {\left (x e + d\right )}^{2} b f^{2} g n e^{\left (-2\right )} \log \left (x e + d\right ) - 3 \, {\left (x e + d\right )} b d f^{2} g n e^{\left (-2\right )} \log \left (x e + d\right ) + {\left (x e + d\right )}^{3} b f g^{2} e^{\left (-3\right )} \log \left (c\right ) - 3 \, {\left (x e + d\right )}^{2} b d f g^{2} e^{\left (-3\right )} \log \left (c\right ) + 3 \, {\left (x e + d\right )} b d^{2} f g^{2} e^{\left (-3\right )} \log \left (c\right ) - \frac {3}{4} \, {\left (x e + d\right )}^{2} b f^{2} g n e^{\left (-2\right )} + 3 \, {\left (x e + d\right )} b d f^{2} g n e^{\left (-2\right )} + {\left (x e + d\right )}^{3} a f g^{2} e^{\left (-3\right )} - 3 \, {\left (x e + d\right )}^{2} a d f g^{2} e^{\left (-3\right )} + 3 \, {\left (x e + d\right )} a d^{2} f g^{2} e^{\left (-3\right )} + {\left (x e + d\right )} b f^{3} n e^{\left (-1\right )} \log \left (x e + d\right ) + \frac {3}{2} \, {\left (x e + d\right )}^{2} b f^{2} g e^{\left (-2\right )} \log \left (c\right ) - 3 \, {\left (x e + d\right )} b d f^{2} g e^{\left (-2\right )} \log \left (c\right ) - {\left (x e + d\right )} b f^{3} n e^{\left (-1\right )} + \frac {3}{2} \, {\left (x e + d\right )}^{2} a f^{2} g e^{\left (-2\right )} - 3 \, {\left (x e + d\right )} a d f^{2} g e^{\left (-2\right )} + {\left (x e + d\right )} b f^{3} e^{\left (-1\right )} \log \left (c\right ) + {\left (x e + d\right )} a f^{3} e^{\left (-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.35, size = 352, normalized size = 2.36 \begin {gather*} x\,\left (\frac {4\,a\,e\,f^3+12\,a\,d\,f^2\,g-4\,b\,e\,f^3\,n}{4\,e}+\frac {d\,\left (\frac {d\,\left (\frac {g^2\,\left (a\,d\,g+3\,a\,e\,f-b\,e\,f\,n\right )}{e}-\frac {d\,g^3\,\left (4\,a-b\,n\right )}{4\,e}\right )}{e}-\frac {3\,f\,g\,\left (2\,a\,d\,g+2\,a\,e\,f-b\,e\,f\,n\right )}{2\,e}\right )}{e}\right )+x^3\,\left (\frac {g^2\,\left (a\,d\,g+3\,a\,e\,f-b\,e\,f\,n\right )}{3\,e}-\frac {d\,g^3\,\left (4\,a-b\,n\right )}{12\,e}\right )+\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (b\,f^3\,x+\frac {3\,b\,f^2\,g\,x^2}{2}+b\,f\,g^2\,x^3+\frac {b\,g^3\,x^4}{4}\right )-x^2\,\left (\frac {d\,\left (\frac {g^2\,\left (a\,d\,g+3\,a\,e\,f-b\,e\,f\,n\right )}{e}-\frac {d\,g^3\,\left (4\,a-b\,n\right )}{4\,e}\right )}{2\,e}-\frac {3\,f\,g\,\left (2\,a\,d\,g+2\,a\,e\,f-b\,e\,f\,n\right )}{4\,e}\right )-\frac {\ln \left (d+e\,x\right )\,\left (b\,n\,d^4\,g^3-4\,b\,n\,d^3\,e\,f\,g^2+6\,b\,n\,d^2\,e^2\,f^2\,g-4\,b\,n\,d\,e^3\,f^3\right )}{4\,e^4}+\frac {g^3\,x^4\,\left (4\,a-b\,n\right )}{16} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________